package com.leizi.igym.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @Author: leizi0110
 * @CreateTime: 2024-04-20  21:54
 * @Description:
 */
//
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(description = "帖子返回的数据格式")
public class PostVO {

    @Schema(name = "主键值")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(name = "发布人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    @Schema(name = "帖子展示图")
    private String pictures;

    @Schema(name = "帖子标题")
    private String title;

    @Schema(name = "帖子发布人昵称")
    private String nickname;

    @Schema(name = "帖子描述")
    private String content;

    @Schema(name = "帖子创建时间")
    private LocalDateTime createTime;

    @Schema(name = "帖子发布人头像")
    private String avatar;

    @Schema(name = "帖子是否点赞")
    private Integer liked;

    @Schema(name = "帖子点赞数量")
    private Integer likeNum;

    @Schema(name = "帖子是否收藏")
    private Integer collected;

    @Schema(name = "帖子收藏数量")
    private Integer collectNum;
}
